package com.worker.ssm.service;

import com.github.pagehelper.PageInfo;
import com.worker.ssm.pojo.Employee;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 *
 */
public interface EmployeeService {

    /**
     * 根据Id查询员工的信息
     */
    Employee getEmployeeById(Integer empId);

    /**
     * 查询所有的员工信息
     * @return
     */
    List<Employee> getAllEmployee();

    /**
     * 获取员工的分页信息
     * @param pageNum
     * @return
     */
    PageInfo<Employee> getEmployeePage(Integer pageNum);

    /**
     * 添加员工
     */
    int insertEmployee(Employee employee);

    /**
     * 根据id删除员工
     */
    int deleteEmployee(Integer empId);

    /**
     * 更新员工
     */
    int updateEmployee(Integer empId,Employee emp);
}
